package com.itsu.application.util;

import java.util.Optional;

import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.control.ButtonType;
import javafx.stage.Modality;

public class AlertUtil {

	public static Optional<ButtonType> alert(String header, String content, AlertType type) {
		Alert alert = new Alert(type);
		alert.setContentText(content);
		alert.setHeaderText(header);
		alert.initModality(Modality.APPLICATION_MODAL);
		Optional<ButtonType> optional = alert.showAndWait();
		return optional;
	}
}
